<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>考神驾到手机交通标识详细页</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/public.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/windowsheight.js"></script>

    <script src="${pageContext.request.contextPath}/manager_page/layui/layui.js"></script>
    <style type="text/css">
        .fix_bottom{
            position: fixed;bottom: 20px;left: 0;width: 100%;
        }
    </style>
</head>

<body>

<input type="hidden" id="icon_class_hidden" value=${param.icon_class_hidden} >
<input type="hidden" id="icon_index_hidden" value=${param.icon_index_hidden} >

<!-----------头部开始--------------->
<%--<%@ include file="page_head.jsp"%>--%>
<!-----------头部结束--------------->
<!-----------内容开始--------------->
 <div class="content">
   <div class="newdetailcon">
     <div class="biaoti"><img src="images/libg_06.jpg"><span id="icon_title"></span></div>
   </div>
     <div class="biaotiborder">&nbsp;</div>
   <div class="newdetailcon"> 
     <div class="article_con">
       <img id="icon_img" src="#">
      <p id="icon_des"></p>
     </div>
     <div class="article_page fix_bottom">

       <span class="fl" onclick="lastOne()">
           <a href="javascript:;"><label style="color: #4db14d"><--上一个</label></a>
       </span>
       <span class="fr" onclick="nextOne()">
           <a href="javascript:;"><label style="color: #4db14d">下一个--></label></a>
       </span>
       <div class="clear"></div>
     </div>
   </div>
 </div>
 <!-----------内容结束--------------->

</body>

<script>
    var layer;
    layui.use('layer',function(){
        layer=layui.layer;
    });

    var path="${pageContext.request.contextPath}/img_artificial/icon_img/";
    var icon_class=$("#icon_class_hidden").val();
    var array_icon;
    var current_index=parseInt($("#icon_index_hidden").val());
    var final_index;


    window.onload=function(){
        initIcon();
    }


    function initIcon(){
        $.ajax({
            url:"${pageContext.request.contextPath}/front_icon/icon_init.do",
            data:{
                "icon_class":icon_class
            },
            success:function(data,status){
                if(status=="success"){
                    array_icon=data;
                    final_index=data.length-1;
                    changeIcon_info(data,current_index);
                }
            }
        });


    }

    function changeIcon_info(array_icon,current_index){

        $("#icon_title").text(array_icon[current_index].icon_name);
        $("#icon_img").attr("src",path+array_icon[current_index].icon_img);
        $("#icon_des").text(array_icon[current_index].icon_des);

    }

    function lastOne(){
        if(current_index<=0){
            layer.msg("这已经是第一个了");
        }else{
            current_index--;
            changeIcon_info(array_icon,current_index);
        }
    }
    function nextOne(){
        if(current_index>=final_index){
            layer.msg("这已经是最后一个了");
        }else{
            current_index++;
            changeIcon_info(array_icon,current_index);
        }
    }
</script>











<!--头部高度赋给列表的topjs-->
<script>
   var heighttop=$(".top").height();
   $(".topmenu").css("top",heighttop);
    $(".menumore").toggle(function(){
	     $(".topmenu").show(); 
	   },function(){
	     $(".topmenu").hide(); 
	 	   })
   $(".buttontop").click(function(){
	     $(".topmenu").hide();  
	   })
	   
 $(function(){
	 $(".tasecartop span a").click(function(){
		  var $banktip=$(this).attr("tip");
		  $($banktip).show().siblings().hide();
		  $(".tasecartop span a").removeClass("payaclik");
		  $(this).addClass("payaclik");
		 })
	
	})
 </script>
 
<!--头部高度赋给列表的topjs-->
<!--banner将图片的高度赋给父级扪js-->
<script>
   var heighta=$("#incltialiu li:eq(0) img").height();
   $(".main,.width,#incltialiu").height(heighta) ;
 </script>
 <!--banner将图片的高度赋给父级扪js-->
<!--首页标题点击出现更多分类js-->
 <script>
	$(".titlemore").toggle(function(){
		$(this).parent(".tabtila").siblings(".moresort").show()
		$(this).children("img").attr("src","images/title_692.jpg")
		},function(){
		$(this).parent(".tabtila").siblings(".moresort").hide()
		$(this).children("img").attr("src","images/title_69.jpg")
		})
  </script>
 <!--首页标题点击出现更多分类js-->
</html>
